package com.ftf.tp.common.annotation;

import com.ftf.tp.common.constants.EsDataType;
import org.springframework.stereotype.Component;

import java.lang.annotation.*;

/**
 * @author tanghao
 */
@Documented
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Component
public @interface EsField {
    //默认属性名
    String name() default "";

    //数据类型
    EsDataType type() default EsDataType.TEXT;

    String analyzer() default ""; //分词

    String searchAnalyzer() default ""; //搜索分词
}
